package com.zxmc.server.controller.user;

import com.zxmc.common.result.Result;
import com.zxmc.pojo.entity.NovelType;
import com.zxmc.server.service.NovelTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user/novelType")
@Slf4j
@Api(tags = "小说标签相关接口")
public class NovelTypeController {
    @Autowired
    private NovelTypeService novelTypeService;

    @ApiOperation("查询小说标签")
    @GetMapping("/list")
    public Result<List<NovelType>> list(Integer id) {
        log.info("查询小说标签:{}", id);
        return Result.success(novelTypeService.list(id));
    }
}
